﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace Testing
{
    public class PointRegister
    {
        public string VideoName { get; set; }
        public List<FramePoint> FramePoints{get;set;}

        public PointRegister(string name)
        {
            VideoName = name;
            FramePoints = new List<FramePoint>();
        }
        public PointRegister() { }

        public void addPoint(Point p, int i)
        {
            FramePoints.Add(new FramePoint(p, i));
        }

        public Point? getPointForFrame(int i)
        {
            foreach (FramePoint fp in FramePoints)
            {
                if (fp.Frame == i)
                {
                    return fp.Point;
                }
            }
            return null;
        }
    }

    public class FramePoint{
        public Point Point{get;set;}
        public int Frame{get;set;}
        public FramePoint() { }
        public FramePoint(Point p, int i){
            this.Frame=i;
            this.Point=p;
        }
    }
}
